import request from '../utils/request'

export function listSalaries(params) {
  return request({
    url: '/api/salary/list',
    method: 'get',
    params,
  })
}

export function auditSalary(data) {
  return request({
    url: '/api/salary/audit',
    method: 'post',
    params: data,
  })
}

export function batchAuditSalary(data) {
  return request({
    url: '/api/salary/batch-audit',
    method: 'post',
    params: data,
  })
}

export function getStudentSalaryInfo() {
  return request({
    url: '/api/salary/student',
    method: 'get'
  })
}

export function getStudentSalaryPage(params) {
  return request({
    url: '/api/salary/student-page',
    method: 'get',
    params: params
  })
}

// 教师获取工资发放列表
export function getTeacherSalaryList(params) {
  return request({
    url: '/api/salary/teacher/list',
    method: 'get',
    params,
  })
}

// 教师审核工资
export function approveSalary(data) {
  return request({
    url: '/api/salary/teacher/approve',
    method: 'post',
    data,
  })
}

// 教师拒绝工资
export function rejectSalary(data) {
  return request({
    url: '/api/salary/teacher/reject',
    method: 'post',
    data,
  })
}

// 教师重新发送工资
export function resendSalary(data) {
  return request({
    url: '/api/salary/teacher/resend',
    method: 'post',
    data,
  })
}

// 教师修改工资信息
export function updateSalary(data) {
  return request({
    url: '/api/salary/teacher/update',
    method: 'post',
    data,
  })
}

export function getSalaryStats() {
  return request({
    url: '/api/salary/stats',
    method: 'get'
  })
} 